package com.cn.service;


import com.cn.dao.UserAddDao;
import com.cn.entity.UserAddEntity;
import com.cn.serviceIntface.UserAddServiceIntface;

import java.sql.SQLException;
import java.util.List;

public class UserAddService implements UserAddServiceIntface {
    UserAddDao userAddDao=new UserAddDao();
    @Override
    public int add(UserAddEntity entity, String type) throws SQLException, ClassNotFoundException {
        return userAddDao.add( entity,  type);
    }

    @Override
    public int update(UserAddEntity entity, String type) throws SQLException, ClassNotFoundException {
        return userAddDao.update(entity,type);
    }

    @Override
    public List<UserAddEntity> queryAll(Integer currentPageNo, Integer pageSize) throws SQLException, ClassNotFoundException {
        return userAddDao.queryAll(currentPageNo,pageSize);
    }

    @Override
    public List<UserAddEntity> queryAll(String id) {
        return userAddDao.queryAll(id);
    }

    public UserAddEntity queryOne(String id) { return userAddDao.queryOne(id); }

    @Override
    public List<UserAddEntity> queryAll() {
        return userAddDao.queryAll();
    }
}
